﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DAL
{
    public interface IBaseInfo<T>
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        T Create(T m);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int Delete(int id);

        /// <summary>
        /// 查询全部信息
        /// </summary>
        /// <returns></returns>
        IQueryable<T> QueryAll();

        /// <summary>
        /// 查询全部信息
        /// </summary>
        /// <returns></returns>
        List<T> GetAll();

        /// <summary>
        /// 查询一条信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        T Queryable(int id);
    }
}
